//
//  SDNetWorkTool.h
//  SuperDoctor
//
//  Created by 李忠 on 7/5/16.
//  Copyright © 2016 SD. All rights reserved.
//

#import <AFNetworking/AFNetworking.h>

/** 成功回调 */
typedef void(^SuccessCompletedBlock)(id responseObject);

/** 失败回调 */
typedef void(^FailureCompletedBlock)(NSError *error);


@interface SDNetWorkTool : AFHTTPSessionManager

+ (instancetype)shareManager;

/** 自定义的 GET 请求 */
- (void)GET_RequestWithUrlString:(NSString *)urlString
                          parmas:(NSDictionary *)params
                   successBloock:(SuccessCompletedBlock)success
                    failureBlock:(FailureCompletedBlock)failure;


/** 自定义的 POST 请求 */
- (void)POST_RequestWithUrlString:(NSString *)urlString
                           parmas:(NSDictionary *)params
                    successBloock:(SuccessCompletedBlock)success
                     failureBlock:(FailureCompletedBlock)failure;

-(void)getAFNetworkReachabilityStatusWithUnknown:(void(^)())UnknownBlock
                                    NotReachable: (void(^)())NotReachableBlock ReachableViaWWAN:(void(^)())ReachableViaWWANBlock ReachableViaWiFi:(void(^)())ReachableViaWiFiBlock;


-(void)getAFNetworkReachabilityStatusWithUnknown:(void(^)())UnknownBlock Reachable: (void(^)())ReachableBlock;
@end
